import request from '@/utils/request';

// 查询设备运维列表
export function listMaintenance(query) {
    return request({
        url: '/iot/maintenance/list',
        method: 'get',
        params: query,
    });
}
export function alllList(query) {
    return request({
        url: '/iot/maintenance/alllList',
        method: 'get',
        params: query,
    });
}

// 查询设备运维详细
export function getMaintenance(maintenanceId) {
    return request({
        url: '/iot/maintenance/' + maintenanceId,
        method: 'get',
    });
}

// 新增设备运维
export function addMaintenance(data) {
    return request({
        url: '/iot/maintenance',
        method: 'post',
        data: data,
    });
}

// 修改设备运维
export function updateMaintenance(data) {
    return request({
        url: '/iot/maintenance',
        method: 'put',
        data: data,
    });
}

// 删除设备运维
export function delMaintenance(maintenanceId) {
    return request({
        url: '/iot/maintenance/' + maintenanceId,
        method: 'delete',
    });
}
